<template>
  <div id="mod">
    <legend>modal</legend>
    <button @click="showModal">点击显示modal</button>
    <modal :visible="visible" @makesure="makesure" @cancel="cancel"></modal>
  </div>
</template>


<script>
// 引入

import modal from "./fengzhuang-modal.vue";
export default {
  // 注册、
  components: {
    modal,
 
  },
  data () {
   return {
      visible:false
   }
  },
  methods:{
   showModal(){
      this.visible=true
   }, cancel(){
        this.visible=false
    },
    makesure(){
        this.visible=false
    }
  }
};
</script>